export function getFirstInfo(cities, stateProvinceGeoId, cityId,countyGeoId){
	
	var provice, city, county;
	for(var i = 0; i < cities.length; i++){
		if(cities[i].value.substr(0,2) == stateProvinceGeoId){
			provice = cities[i].label;
			
			console.log(stateProvinceGeoId)
			console.log(provice)
			for(var j= 0; j< cities[i].children.length; j++){
				if(cities[i].children[j].value == cityId.substr(0,6) 
				|| (cities[i].children[j].value== (cityId.substr(4,2)+"0000")))
				{
					
// 					console.log(cityId)
// 					console.log(JSON.stringify(cities[i].children[j]))
					city = cities[i].children[j].label;
					//console.log(city)
					if(cities[i].children[j].children !== undefined && cities[i].children[j].children.length > 0)
					{
						for(var z =0; z <cities[i].children[j].children.length; z++ ){
							if(cities[i].children[j].children[z].value == countyGeoId.substr(0,6)){
								county = cities[i].children[j].children[z].label;
								break;
							}
						}
					}
					
					break;
				}
			}
			break;
		}
	}
	return {
		provice: provice,
		city: city,
		county: county
	}
}